
$('.ch-service-list .row div').click(function() {
	window.location.href='../detail/index.html';
});


// 弹窗点击
$('.ch-div1 div').click(function(event) {
	$(this).siblings().removeClass('active')
	$(this).addClass('active');
	$('.ch-div2').children('div').removeClass('active')
	$('.ch-div3').children('div').removeClass('active')
	$('.ch-div3').children('div').children('img').attr("src","../../images/checkbox@2x.png");
	$('.ch-service-list-tips text').text($(this).html());
	event.stopPropagation();
});
$('.ch-div2 div').click(function(event) {
	$(this).siblings().removeClass('active')
	$(this).addClass('active');
	event.stopPropagation();
});
$('.ch-div3 div').click(function(event) {
	$(this).siblings().removeClass('active')
	$(this).siblings().children('img').attr("src","../../images/checkbox@2x.png");
	$(this).addClass('active');
	$(this).children('img').attr("src","../../images/check@2x.png");
	event.stopPropagation();
});
// 重置
$('.ch-reset').click(function(event) {
	$('.ch-div1').children('div').removeClass('active')
	$('.ch-div2').children('div').removeClass('active')
	$('.ch-div3').children('div').removeClass('active')
	$('.ch-div3').children('div').children('img').attr("src","../../images/checkbox@2x.png");
	event.stopPropagation();
});
// 确认
$('.ch-affirm').click(function(event){
	$('.ch-index-popUp').css('display', 'none');
	$(".ch-body").removeClass('ch-fixed');
	$('.ch-service-list-tips span').removeClass('active')
	$('.ch-service-list-tips span span').addClass('glyphicon-menu-down').removeClass('glyphicon-menu-up')
	event.stopPropagation();
});
// 服务弹窗
$('.ch-service-list-tips span').click(function(){
	var bodyscroll = 0; 
	bodyscroll = -$(window).scrollTop();
	$(".ch-body").addClass('ch-fixed');
	$(".ch-body").css("top",bodyscroll);
	$('.ch-index-popUp').css('display', 'block');
	$(this).addClass('active')
	$(this).children('span').removeClass('glyphicon-menu-down').addClass('glyphicon-menu-up')
})
// 侧边栏出现
var num = 1;
$('.header-box span:eq(1)').click(function(){
	if(num == 1){
		num = 2;
		$('.lf-sidebar').css('display', 'block');
		$(this).removeClass('glyphicon-menu-hamburger');
		$(this).addClass('glyphicon-remove');
		$('.ch-body').addClass('lf-position');
		return false;
	};
	if(num == 2){
		num = 1;
		$('.lf-sidebar').css('display', 'none');
		$(this).addClass('glyphicon-menu-hamburger');
		$(this).removeClass('glyphicon-remove');
		$('.ch-body').removeClass('lf-position');
		return false;
	};
});
// 侧边栏子集的点击
$('.lf-subset-ul li').click(function() {
	num = 1;
	$('.lf-sidebar').css('display', 'none');
	$('.header-box span:eq(1)').addClass('glyphicon-menu-hamburger');
	$('.header-box span:eq(1)').removeClass('glyphicon-remove');
	$('.ch-body').removeClass('lf-position');
})
// 一级li
$('.lf-ul-click').click(function(){
	num = 1;
	$('.lf-sidebar').css('display', 'none');
	$('.header-box span:eq(1)').addClass('glyphicon-menu-hamburger');
	$('.header-box span:eq(1)').removeClass('glyphicon-remove');
	$('.ch-body').removeClass('lf-position');
})